package com.ruoyi.oc.controller;

import com.ruoyi.oc.service.ISalesReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 销售报表控制器
 *
 * @author ruoyi
 * @date 2025-06-18
 */
@RestController
@RequestMapping("/oc/report")
public class SalesReportController {

    @Autowired
    private ISalesReportService salesReportService;

    @GetMapping("/goodsSalesQuantity")
    public Map<String, Long> getGoodsSalesQuantity() {
        return salesReportService.getGoodsSalesQuantity();
    }

    @GetMapping("/orderSalesAmount")
    public Map<String, Double> getOrderSalesAmount() {
        return salesReportService.getOrderSalesAmount();
    }

    @GetMapping("/dailySalesTotal")
    public Map<String, Double> getDailySalesTotal() {
        return salesReportService.getDailySalesTotal();
    }
}